package com.example.demo.service;

import com.example.demo.entity.Userinfo;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/6/15
 */
@Service
@RequestMapping("/user")
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public Userinfo getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    public Userinfo getUserById(Integer id) {
        return userMapper.getUserById(id);
    }
}
